package daobeauty.interceptor.invoke.factory.impl;

import java.lang.reflect.Method;

import daobeauty.interceptor.DaoMetaData;
import daobeauty.interceptor.invoke.InvokeStrategy;
import daobeauty.interceptor.invoke.factory.InvokeStrategyFactory;
import daobeauty.interceptor.invoke.impl.GetConstantObjectInvoke;

public abstract class AbstractConstantObjectInvokeFactory implements InvokeStrategyFactory {
	
	public abstract Object createObject(DaoMetaData daoMetaData);
	
	public final InvokeStrategy create(DaoMetaData daoMetaData, Method daoMethod) {
		return new GetConstantObjectInvoke(daoMethod, createObject(daoMetaData));
	}
}
